package com.kuyou.ddhm_tv.utils;

public class BsJudge {

    public static final  int BS = 1;//血糖
    public static final  int TB = 2;//总胆固醇
    public static final  int UA = 3;//尿酸
    public static final  int BK = 4;//血酮

    public static String getPaperType(String string) {
        switch (string) {
            case "01":
                return "血糖试纸";
            case "02":
                return "总胆试纸";
            case "03":
                return "尿酸试纸";
            case "04":
                return "血酮试纸";
            case "05":
                return "血糖CODE";
            case "06":
                return "总胆CODE";
            case "07":
                return "尿酸CODE";
            case "08":
                return "血酮CODE";
            default:
                return "测量异常";
        }
    }

    public static String deviceState(String string) {
        switch (string) {
            case "10":
                return "仪器正常";
            case "11":
                return "温度过高";
            case "12":
                return "温度过低";
            default:
                return null;
        }
    }

    public static String paperState(String string) {
        switch (string) {
            case "01":
                return "试纸合格、等待滴血 ";
            case "02":
                return "试纸过期，请拔出试纸";
            case "10":
                return "CODE 卡更新成功";
            case "11":
                return "CODE 卡校验异常";
            case "12":
                return "0X12:不支持的 CODE";
            default:
                return "试纸异常";
        }
    }

    public static String getStatue(String string) {
        switch (string) {
            case "01":
                return "正常";
            case "02":
                return "偏高";
            case "03":
                return "偏低";
            default:
                return "测量异常";
        }
    }


    //判断试纸
    public static boolean JudgePaper(int form, String sting) {
        switch (sting) {
            case "01":
                return BS == form;
            case "02":
                return TB == form;
            case "03":
                return UA == form;
            case "04":
                return BK == form;
            default:
                return false;
        }
    }


}

